//
//  CLorderDetailTableViewCell.swift
//  CLEasyBBQ
//
//  Created by simon zhao on 2017/4/5.
//  Copyright © 2017年 simon zhao. All rights reserved.
//

import UIKit

class CLorderDetailTableViewCell: UITableViewCell {
    
    var seqLabel : CLLabel!
    var nameLabel : CLLabel!
    var numberLabel : CLLabel!
    var priceLabel : CLLabel!
    var totalLabel : CLLabel!
    let labelHeight = 35
    let labelWidth = Int(UIScreen.main.bounds.size.width / 5)
    
    
    override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
        
        super.init(style: style, reuseIdentifier: reuseIdentifier)
            
        seqLabel = CLLabel()
        nameLabel = CLLabel()
        numberLabel = CLLabel()
        priceLabel = CLLabel()
        totalLabel = CLLabel()
        
        self.addSubview(seqLabel)
        self.addSubview(nameLabel)
        self.addSubview(numberLabel)
        self.addSubview(priceLabel)
        self.addSubview(totalLabel)
        
    }
    
    override func layoutSubviews() {
        
        super.layoutSubviews()
        
        seqLabel.frame = CGRect(x:0,y:0,width:labelWidth,height:labelHeight)
        nameLabel.frame = CGRect(x:labelWidth,y:0,width:labelWidth,height:labelHeight)
        numberLabel.frame = CGRect(x:labelWidth*2,y:0,width:labelWidth,height:labelHeight)
        priceLabel.frame = CGRect(x:labelWidth*3,y:0,width:labelWidth,height:labelHeight)
        totalLabel.frame = CGRect(x:labelWidth*4,y:0,width:labelWidth,height:labelHeight)
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}

extension UILabel{
    
    
}
